# -*- coding: UTF-8 -*-

class Layer:
    def __init__(self, layer_id, layer_name, layer_feature):
        '''
        layer_name: [star_number, download_number, image_number, size, layerid, image_list]
        'sha256:8d380c957e3e85d308c5520a5fa0a29687cf3bb956cd141b5fc14c78cf9dfed1': ['110', '159234', '1', '639052673', ['swift']]
        '''
        self.id = layer_id
        self.name = layer_name
        self.star_number = int(layer_feature[0])
        self.download_number = int(layer_feature[1])
        self.image_number = int(layer_feature[2])
        # self.size = int(layer_feature[3]) / (1024 * 1024)
        self.size = int(layer_feature[3])*3/ (1024*1024*8) # MB
        self.image_list = layer_feature[-1]


'''
maximum layer size is:  275.18161326646805
average layer size is :  14.986529518151979
'''
